#pragma once
#include <gl\GL.h>
#include <vector>

using namespace std;

////////////////////////////////////////////////////////////////////////
// @ Beschreibung: 	Point in 2d space
////////////////////////////////////////////////////////////////////////
class _2DPoint
{
	public:
		GLdouble m_X;
		GLdouble m_Y;

	
		_2DPoint(double X, double Y)
		{
			m_X = X;
			m_Y = Y;
		}
};

////////////////////////////////////////////////////////////////////////
// @ Beschreibung: 	Data container that represents a graph
////////////////////////////////////////////////////////////////////////
class _GraphData
{
public:
	_GraphData();
	_GraphData(TCHAR* Title);
	~_GraphData(void);

	_FGHandle m_Handle;
	vector<_2DPoint> m_Points;
	COLORREF m_LineColor;
	COLORREF m_PointColor;
	double m_PointSize;
	bool m_Visible;
	bool m_DrawLine;
	double m_MinX, m_MinY, m_MaxX, m_MaxY;
	CString m_Title;
	double m_MinDistance;
	double m_SelectionMin;
	double m_SelectionMax;
	int    m_SelectionMaxIndex;
	int    m_SelectionMinIndex;

	// Methoden
	void addPoint(double x, double y);
	void _GraphData::setSelection(double Min, double Max);
	void _GraphData::resetSelection();
	bool _GraphData::isSelectionActive();
        vector<_2DPoint>* getPoints()
        {
          return &m_Points;
        }
};

